#ifndef _FIG_UI_REMOVEAD_H_
#define _FIG_UI_REMOVEAD_H_

#include "gameflow/ui_state.h"
#include "gameflow/ui_popup.h"
#include "inapppurchase/inapppurchasemanager.h"

class FIGUIRemoveAd :  public gameflow::UIPopup  //, InAppPurchaseHandler
{
public:
	
	static FIGUIRemoveAd&				Instance();
	
	

// MAIN MENU events

	virtual void		Tick(float dt);
	virtual void        Show(ui::UIMover::MoverEvent Event);
	virtual void        Hide(ui::UIMover::MoverEvent Event);
	virtual void        ForceHide();
    virtual void		OnPurchaseSuccess();
	virtual void		OnPurchaseFail();

    

protected:


	void DELEGATE_CALL  OnButtonBuy(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);
	void DELEGATE_CALL  OnButtonRestore(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);

	void				StartConnectingPopup();

	FIGUIRemoveAd();

	math::Counter		m_CounterPopupAnimate;
	math::Counter		m_CounterBackPopupAnimate;

	float				m_ConnectinBackButtonDealy;
	ui::UIWidget*		m_pConnectBackButton;

	math::Vec2			m_SizeBuyPopup;
	math::Vec2			m_PosBuyPopup;
	ui::UIWidget*		m_pUIBuyFrame;
};


#endif //_FIG_UI_REMOVEAD_H_